"get.S2" = function(X,Y){
		n=length(X);
		X.summand = 0
		Y.summand = 0
		#do the X
		for(k in 1:n){
			for(l in 1:n){
				X.summand = X.summand + sqrt(sum((X[k]-X[l])^2))				
			}
		}
		#do the Y
		for(k in 1:n){
			for(l in 1:n){
				Y.summand = Y.summand + sqrt(sum((Y[k]-Y[l])^2))				
			}
		}

		result = 1/(n^2)*X.summand * 1/(n^2)*Y.summand
	return(structure(list(S2 = result)));
}